<template>
	<view class="page" :style="{minHeight:$height()}">
		<view class="title" style="margin-bottom: 16rpx;">
			信息确认
		</view>

		<view class="itembie">
			<view class="left">
				<text class="info">合伙省份</text>
				<text class="xing">*</text>
			</view>
			<view class="right1"
				style="margin-bottom: 16rpx;display: flex;justify-content: center;align-items: center;">
				<u-checkbox-group width="300rpx" style="margin:0 0 0rpx 40px;" @change="heHuoShengFenChange">
					<u-checkbox v-model="item.checked" v-for="(item, index) in heHuoShengFenData" :key="index"
						:name="item.id">{{item.name}}</u-checkbox>
				</u-checkbox-group>
			</view>
		</view>

		<view class="footer">
			<view class="compelet" @click="submit">
				完成
			</view>
		</view>
		<u-modal v-model="show" title="提示" content='合伙人申请成功,正在审核中,请您耐心等待！' @confirm="confirm"></u-modal>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				show:false,
				form: {
					provinceIdList: '' //合伙省份id

				},
				heHuoShengFenData: []
			}
		},
		onShow() {
			this.getHeHuoRen()
		},
		methods: {
			// 合伙人省份查询
			getHeHuoRen() {
				this.$axios.request(this.$api.ShiListApi, "GET", {
					pid: 0,
					hasTowner: 1
				}).then((val) => {

					this.heHuoShengFenData = val.data.map(items => {
						return {
							id: items.id,
							name: items.name
						}
					})
				})
			},
			// 获取省份id
			heHuoShengFenChange(e) {
				this.form.provinceIdList = e.join(',')
			},
			confirm() {
				uni.reLaunch({
					url:'/pages/mine/index'
				})
			},
			submit() {
				if (this.form.provinceIdList == '') {
					this.$msg.toast("请选择合伙省份")
					return
				}
				this.$axios.request(this.$api.heHuoRenApi, "POST", this.form).then((val) => {
					this.show = true;

				})
			},
		}
	}
</script>

<style>
	.page {
		width: 100%;
		overflow: hidden;
		background-color: #F9F9FB;
	}

	.title {
		width: 686;
		height: 80rpx;
		padding: 0 32rpx;
		background-color: #FFFFFF;
		margin: 16rpx auto 0;
		font-size: 32rpx;
		font-family: "PingFang SC";
		font-weight: 600;
		line-height: 80rpx;
		color: #333333;
		opacity: 1;
	}

	.item {
		display: flex;
		justify-content: flex-start;
		align-items: center;
		width: 100%;
		height: 90rpx;
		padding: 0 32rpx 0;
		background-color: #FFFFFF;
		margin-bottom: 8rpx;
		margin-bottom: 16rpx;
	}

	.itembie {
		display: flex;
		flex-direction: column;
		justify-content: flex-start;
		align-items: flex-start;
		width: 100%;
		/* height: 90rpx; */
		padding: 10rpx 32rpx 24rpx;
		background-color: #FFFFFF;
		margin-bottom: 8rpx;
		margin-bottom: 16rpx;
	}

	.left {
		display: flex;
		justify-content: flex-start;
		align-items: center;
		width: 230rpx;
		height: 64rpx;
	}

	.info,
	.xing {
		height: 80rpx;
		line-height: 80rpx;
		font-size: 30rpx;
		font-family: "PingFang SC";
		font-weight: 600;
		color: #333333;
		opacity: 1;
	}

	.xing {
		color: #FF2D55;
		font-size: 30;
		height: 64rpx;
		line-height: 64rpx;
		margin-left: 10rpx;
		padding-top: 7rpx;
	}

	.right {
		width: 100%;
		display: flex;
		justify-content: space-between;
		align-items: center;
		height: 80rpx;
		line-height: 80rpx;
		font-size: 30rpx;
		font-family: "PingFang SC";
		font-weight: 300;
		color: #62656D;
		opacity: 1;
	}

	.compelet {
		width: 686rpx;
		height: 80rpx;
		background-color: #2E6ADF;
		opacity: 1;
		border-radius: 4rpx;
		font-size: 32rpx;
		font-family: "PingFang SC";
		font-weight: 400;
		line-height: 80rpx;
		margin: 0 auto 0;
		text-align: center;
		color: #FFFFFF;
		opacity: 1;
	}

	.biTian {
		height: 80rpx;
		line-height: 80rpx;
		font-size: 28rpx;
		font-family: "PingFang SC";
		font-weight: 300;
		color: #62656D;
		margin-left: 20rpx;
	}

	.idBox {
		overflow: hidden;
		height: 448rpx;
		background-color: #FFFFFF;
		margin: 16rpx 0;
	}

	.idTitle {
		height: 28rpx;
		font-size: 26rpx;
		font-family: "PingFang SC";
		font-weight: 300;
		line-height: 28rpx;
		color: #FF2D55;
		opacity: 1;
		margin: 32rpx 32rpx 64rpx;
	}

	.idImageBox {
		width: 288rpx;
		height: 250rpx;
	}

	.imageTxt {
		height: 33rpx;
		font-size: 24rpx;
		font-family: "PingFang SC";
		font-weight: 400;
		line-height: 33rpx;
		color: #707070;
		opacity: 1;
		margin-top: 20rpx;
	}

	.footer {
		display: flex;
		align-items: center;
		overflow: hidden;
		width: 100%;
		height: 227rpx;
		background-color: #FFFFFF;
		margin-top: 16rpx;
	}

	.send {
		height: 40rpx;
		font-size: 24rpx;
		font-family: "PingFang SC";
		font-weight: 300;
		line-height: 40rpx;
		color: #2E6ADF;
		opacity: 1;
		border: 1rpx solid #2E6ADF;
		padding: 0 8rpx;
	}

	.checkBoxRow {
		/* width: 200rpx; */
		display: inline-block;
		/* background-color: #2E6ADF; */
		/* margin-right: 60rpx;
		 */
		/* margin: 30rpx; */
	}

	.right1 {
		width: 100%;
		display: flex;
		align-items: center;
		justify-content: space-between;
		/* background-color: red; */
	}
</style>